import request from "@/utils/request";

// 登录
export const userLoginService = (userLoginRequest) =>
    request.post('user/login', userLoginRequest)
//注册
export const userRegisterService = (userRegisterRequest) =>
    request.post('user/register', userRegisterRequest)
//退出登录
export const userLogout = () =>
    request.post('user/logout')

//获取用户信息
export const getUser = () =>
    request.get('user/get/login')

//获取用户详细信息
export const getUserInfo = (id) =>
    request.get(`user/get/${id}`)

//用户ac排行
export const questionRank = () => {
    return request.get('user/getUserRank')
}

//上传头像
export const upload = (file) => {
    return request.post('user/upload', file)
}
//用户签到
export const addSigns = () => {
    return request.put('user/addSigns')
}
//获取用户连续签到天数
export const getUserAndSigns = () => {
    return request.get('user/getAndSigns')
}
//获取用户本月签到信息
export const getUserSigns = () => {
    return request.get('user/getSigns')
}






